export const tableColumns = [
  {
    name: '规则代码',
    value: 'ruleId',
    align: 'center'
  },
  {
    name: '规则名称',
    value: 'ruleName',
    align: 'left'
  },
  {
    name: '规则内容描述',
    value: 'ruleDes',
    align: 'left'
  }
]
export const calculateOption = [
  {
    label: '大于',
    code: '01'
  },
  {
    label: '等于',
    code: '02'
  },
  {
    label: '小于',
    code: '03'
  },
  {
    label: '大于等于',
    code: '04'
  },
  {
    label: '小于等于',
    code: '05'
  },
  {
    label: '不等于',
    code: '06'
  }
]
export const slaverIndexTypeOption = [
  {
    label: '指标',
    code: '1'
  },
  {
    label: '数字常量',
    code: '2'
  },
  {
    label: '日期常量',
    code: '3'
  },
  {
    label: '指标计算',
    code: '4'
  }
]
export const alertHandleTypeOption = [
  {
    label: '警示',
    code: '1'
  },
  {
    label: '预警待处理',
    code: '2'
  }
]
function _debounce(fn) {
  var timer = null
  return function () {
    var _this = this
    var args = arguments
    if (timer) clearTimeout(timer)
    timer = setTimeout(function () {
      fn.apply(_this, args)
    })
  }
}
export {
  _debounce
}